package com.leoman.welfare.service;

import com.leoman.common.service.GenericManager;
import com.leoman.welfare.entity.Welfare;
import org.springframework.data.domain.Page;
import org.springframework.web.multipart.MultipartRequest;

import java.io.IOException;
import java.text.ParseException;
import java.util.List;

/**
 * Created by 蔡琦 on 2016/6/29 0029.
 *
 */
public interface WelfareService extends GenericManager<Welfare>{

    // 福利社列表（分页）
    Page<Welfare> page(Integer pageNum, Integer pageSize);

    // 根据类型查询对应的福利社列表
    List<Welfare> findByType(Integer type);

    // 保存福利社
    Integer saveAll(Long welfareId,
                        String title,
                        String subtitle,
                        Integer type,
                        Integer storeNum,
                        Integer changeNum,
                        String startDate,
                        String endDate,
                        Integer limit,
                        Integer coin,
                        String length,
                        Integer coin1,
                        Integer experience,
                        String description1,
                        Integer coin2,
                        String description2,
                        Integer coin3,
                        String description3,
                        String url4,
                        Integer coin5,
                        String url5,
                        MultipartRequest multipartRequest) throws IOException, ParseException;

    // 删除福利社
    Integer deleteWelfare(Long welfareId);

    List<Welfare> findByStick();
}
